Centrallix - It's Different than what you Think
Home   |   Technology   |   Screen Shots   |   Download   |   Documentation   |   History   |   For Developers

Search...


Search For:

Index...


Centrallix Documentation
1. Getting Started
2. Applications Overview
3. Application Components
4. Reports Overview
5. Report Components
6. SQL Language
7. Process Modeling
8. Application Modeling
9. Role-Based Security
10. Business Logic Modeling
11. Other Objects
12. External API's
13. Internal API's

6.8.9 SQL Operators


Operators

Here is a summary of the operators that Centrallix supports. Note that these operators apply to both SQL expressions and the expressions found in application, component, and report definitions.

OperatorDescriptionStandard
p + qAddition/concatenation. For numeric values (integer, double, and money data types), this simply adds the two values together and results in a similar value. For string values, this concatenates the two strings together. This operator is undefined for datetime values.Numeric: ANSI. Strings: Sybase/MSSQL.
p - qSubtraction. Subtracts one integer, double, or money data type from another. This operator is undefined for datetime values. For strings, this is the reverse of concatenation: "abc" - "c" would yield "ab". Subtracting strings in this way can be particularly useful when a concatenation expression requires separators between elements, but not after the last element, as in: sum(:string_field + ',') - ','Numeric: ANSI. Strings: Centrallix.
p * qMultiplication. Multiplies one integer, double, or money data type by another. This operator is also defined for multiplying a string value by an integer value - the result is the repeated concatenation of the string (p) a number (q) times.Numeric: ANSI. Strings: Centrallix.
p / qDivision. Divides one integer, double, or money data type by another. This operator is not defined for strings and datetime values.ANSI
NOT pBoolean negation. Boolean values in Centrallix are treated as integers; this operator returns 0 if p is not 0, and returns 1 if p is 0. Alternatively, returns FALSE if p is TRUE, and returns TRUE if p is FALSE.
p AND qBoolean AND. Returns TRUE (1) if both p and q are not FALSE (0). Otherwise returns FALSE (0).ANSI, except Centrallix allows treating a boolean as a numeric value.
p OR qBoolean OR. Returns TRUE (1) if either p or q is not FALSE (0). Otherwise returns FALSE (0).ANSI
p IS NULLReturns TRUE (1) if p is NULL, otherwise returns FALSE.ANSI
p IS NOT NULLReturns TRUE (1) if p isn't NULL, otherwise returns FALSE.ANSI
p = qEquality comparison. Also can be written as "p == q". Results in TRUE (1) if p and q have the same value. If either p or q is NULL, this returns FALSE (0). Even if both p and q are NULL, this returns FALSE (0).ANSI (=). Centrallix (==).
p != qInequality comparison. Also can be written as "p <> q". Results in TRUE (1) only if p and q have different values. If either p or q are NULL (or if both are NULL), results in FALSE(0).ANSI (!=). Centrallix(<>).
p > qGreater-than. Results in TRUE (1) only if p is greater than q and both p and q are not NULL. When comparing strings, the strings are compared on a binary basis.ANSI
p >= qGreater than or equals. Also can be written "p !< q" (p is not less than q). Results in TRUE only if p is greater than or equal to q and both p and q are not NULL.ANSI (>=). Centrallix (!<).
p < qLess-than. Results in TRUE (1) only if p is less than q and both p and q are not NULL.ANSI
p <= qLess than or equals. Also can be written "p !> q" (p is not greater than q). Results in TRUE only if p is less than or equal to q and both p and q are not NULL.ANSI (<=). Centrallix (!>).
p *= qAn equality comparison operator for performing an outer join in a WHERE clause. The "mandatory" table's attribute in the outer join should be on the * side of the *= (or =*) operator. For example :tbl:key *= :codetbl:key means that rows from 'tbl' should be returned even if they don't have matching rows from 'codetbl'.Sybase/MSSQL
:pReturns the value of the attribute p, in the "current" object (depends on the context).Centrallix
:p:qReturns the value of q, an attribute of the object p.Centrallix
::pReturns the value of the attribute p in the "parent" object (what object is the parent object depends on the context).Centrallix



Comments...


(none yet)

Add a Comment...


Your Name:
Comment:


(c) 2001-2020 LightSys Technology Services, Inc. All trademarks are property of their respective owners.

Project Hosting Provided By:
Hosted by Sourceforge